using System;

namespace TestReaders
{
  using Slaks.Filters;
  using Slaks.Readers;

	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
      
	     Slaks.Readers.TermBufferReader bufferReader = 
         new TermBufferReader(new Slaks.Filters.EnglishTermFilterMarkovProject(),"s,[[[,]]]m], corporation? no . we don't know it");

      bufferReader.IsOutputPunctuationMarks = true;
      bufferReader.IsOutputSpecialCharacter = true;
      ReaderState state = ReaderState.None;

      while (!bufferReader.Eof())
      {
        string term = bufferReader.NextTerm(ref state);

        Console.WriteLine(term + "    " + state);
      }

      bufferReader.CloseReader();
  
      
      Slaks.Readers.TermBufferReader hebrewReader = new TermBufferReader(new HebrewFilter(),"אני נמחק מקשימה ה  הלבנה. ");

			hebrewReader.OpenStream();
      hebrewReader.IsOutputSpecialCharacter = true;
      while (!hebrewReader.Eof())
      {
        string term = hebrewReader.NextTerm(ref state);
        Console.WriteLine(term + "    " + state);
      }
      hebrewReader.CloseReader();

			Slaks.Readers.TermBufferReader cyrReader = new TermBufferReader(new RussianFilter(),"Многим ты садилась на колени, а теперь вот сидишь и у меня.");

			cyrReader.OpenStream();
			cyrReader.IsOutputSpecialCharacter = true;
			while (!cyrReader.Eof())
			{
				string term = cyrReader.NextTerm(ref state);
				Console.WriteLine(term + "    " + state);
			}
			cyrReader.CloseReader();
		}
	}
}
